USE master
GO
PRINT ''
PRINT '------------------\\10.125.33.16\KSUPLOAD--------------------'

PRINT ''
PRINT '------------------10.125.3.29--------------------'
EXEC master.dbo.sp_addlinkedserver @server = N'10.125.3.29', @srvproduct=N'SQL Server'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.125.3.29',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'swwl',
@rmtpassword='swwl'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.29', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------10.125.3.29\MSSQLSERVER2008--------------------'

PRINT ''
PRINT '------------------10.125.3.32--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.125.3.32', 
@provider=N'SQLOLEDB', 
@datasrc=N'10.125.3.32'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.125.3.32',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'sa',
@rmtpassword='lmeclitsoft321'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.32', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------10.125.3.35--------------------'

PRINT ''
PRINT '------------------10.125.3.5--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.125.3.5', 
@srvproduct=N'SQL Server'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.125.3.5',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'QASS',
@rmtpassword='suibian'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.5', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------10.125.3.51--------------------'

PRINT ''
PRINT '------------------10.125.3.53--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.125.3.53', 
@srvproduct=N'SQL Server'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.125.3.53',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'weihu',
@rmtpassword='weihu'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.53', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.125.3.60--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.125.3.60', 
@srvproduct=N'SQL Server'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.125.3.60',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'hongqp',
@rmtpassword='hongqp123'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.60', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------10.125.3.81--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.125.3.81', 
@srvproduct=N'SQL Server'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.125.3.81',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'hongqp',
@rmtpassword='hongqp123'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.3.81', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------10.125.32.2--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.125.32.2', 
@srvproduct=N'SQL Server'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.125.32.2',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'sa',
@rmtpassword='1234'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.125.32.2', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.125.33.25--------------------'

PRINT ''
PRINT '------------------10.4.41.12--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.4.41.12', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.12',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'sa',
@rmtpassword='13055205250'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.12', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------10.4.41.26--------------------'

PRINT ''
PRINT '------------------10.4.41.27--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.4.41.27', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.27',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'sqladmin',
@rmtpassword='979316'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.27',
@useself=N'False',
@locallogin=N'sa',
@rmtuser=N'sqladmin',
@rmtpassword='979316'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.27',
@useself=N'True',
@locallogin=N'sqladmin',
@rmtuser=NULL,
@rmtpassword=NULL
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.27', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.4.41.37--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.4.41.37', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.37',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'sa',
@rmtpassword='FACsql'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.37', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.4.41.38--------------------'

PRINT ''
PRINT '------------------10.4.41.50--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.4.41.50', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.50',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'hongqp',
@rmtpassword='hongqp123'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.50', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.4.41.80--------------------'
EXEC master.dbo.sp_addlinkedserver
@server = N'10.4.41.80', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.80',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'lenovoQMSO',
@rmtpassword='########'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.80', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.4.41.9--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.4.41.9', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.4.41.9',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'yeyhb',
@rmtpassword='yeyhb'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.4.41.9', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.99.20.103--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.99.20.103', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.99.20.103',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'A_LQM_EDW',
@rmtpassword='########'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.103', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------10.99.20.110--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.99.20.110', 
@srvproduct=N'SQL Server'
GO
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.99.20.110',
@useself=N'False',
@locallogin=NULL,
@rmtuser=NULL,
@rmtpassword=NULL
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.99.20.110',
@useself=N'False',
@locallogin=N'sqladmin',
@rmtuser=N'lmr3_dbdata',
@rmtpassword='jiok@678h'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.110', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------10.99.20.200--------------------'

PRINT ''
PRINT '------------------10.99.20.240--------------------'
EXEC master.dbo.sp_addlinkedserver 
@server = N'10.99.20.240', 
@srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'10.99.20.240',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'swwl',
@rmtpassword='swwl'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'10.99.20.240', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------CSDB--------------------'

PRINT ''
PRINT '------------------FACTORY(10.4.41.9)--------------------'
EXEC master.dbo.sp_addlinkedserver @server = N'FACTORY', @srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'FACTORY',
@useself=N'False',
@locallogin=NULL,
@rmtuser=NULL,
@rmtpassword=NULL
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'FACTORY',
@useself=N'False',
@locallogin=N'huifang',
@rmtuser=N'sa',
@rmtpassword='sql'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'FACTORY',
@useself=N'False',
@locallogin=N'legendsddbo',
@rmtuser=N'sa',
@rmtpassword='sql'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'FACTORY',
@useself=N'False',
@locallogin=N'sa',
@rmtuser=N'sa',
@rmtpassword='sql'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'FACTORY',
@useself=N'False',
@locallogin=N'sqladmin',
@rmtuser=N'sa',
@rmtpassword='sql'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'FACTORY', @optname=N'use remote collation', @optvalue=N'false'
GO
PRINT ''
PRINT '------------------LM_QAS--------------------'
EXEC master.dbo.sp_addlinkedserver @server = N'LM_QAS', @provider=N'SQLOLEDB', @datasrc=N'10.4.41.50'
EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'LM_QAS',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'zhengyh',
@rmtpassword='zhengyh@'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'LM_QAS', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------LMZT_ALL--------------------'
EXEC master.dbo.sp_addlinkedserver @server = N'LMZT_ALL', @provider=N'SQLOLEDB', @datasrc=N'10.99.20.103'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'LMZT_ALL',@useself=N'False',
@locallogin=NULL,@rmtuser=N'DTS_MIDH_QAS',@rmtpassword='########'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_ALL', @optname=N'use remote collation', @optvalue=N'true'
GO
PRINT ''
PRINT '------------------LMZT_ALL--------------------'
EXEC master.dbo.sp_addlinkedserver @server = N'LMZT_DOA', @provider=N'SQLOLEDB', @datasrc=N'10.99.20.102'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'LMZT_DOA',@useself=N'False',
@locallogin=NULL,@rmtuser=N'DTS_MIDH_QAS',@rmtpassword='########'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'LMZT_DOA', @optname=N'use remote collation', @optvalue=N'true'
GO